﻿--------------------- Limits for the patch: ---------------------
Maximum amount of cheat codes 30.
Maximum amount of values for the code 'L' 20.
Maximum amount  of addresses in code 100.
-----------------------------------------------------------------------
---------------- Limits for the file: -------------------
The maximum size of the game file 750Mb 
----------------------------------------------------------------------- 
------------------------- Syntax: --------------------------------
Byte order for variable written down in a file:
 SV - byte order for script values.      
 UV -  byte order for  the user value. using in the code 'V'.
 The order of the parameters is not important. (# SVI UVI # UVI SVI)      

 # SVI UVI // script value intel, user value intel       
 Variables bytes will be written in little endian order.

 # SVM UVM // script value motorola, user value motorola       
 Variables bytes will be written in big endian order.     

 # SVM UVI // script value motorola, user value intel       
 You can combine flags. 

Types of code:      
 'L' - code values selected from list.
 'V' - code values entered in the edit box. 
 'D' - does not using parameters. 

Parameters code:      
 'L' {0, 1, 2, 3, 4} The user values written in the file.      
 # Names of user values written in the file.      

'V' {1} 100 minimum and maximum values that may be set by the user.
'D' {0} does not use parameters.

address:      
 $ address      
 d: 5 in adress writes only the default value 5, the user value is ignored.
 v: 3  in adress writes value selected or set by the user. If the user is not set value, will be used default value 3. 

The size of a variable is calculated automatically:      
00            1 byte
0000         2 bytes
000000     3bytes    
00000000  4 byte 

The size of a user variable for the code 'V' is considered on the size of the maximum value.(max)      
'V' {min, max}       
V' {min, 00000009} user variable size 4 bytes. 

The values in the script to prescribe only in hexadecimal. 
The script must be encoded in ANSI. 
----------------------------------------------------------------------
-----------------------Template script:---------------------
Game name
System name
Game file
Author by 

< byte order byte order

>Cheat name 1
'L' {1, 2, 3, 4} 
 value 1 name
 value 2 name
 value 3 name
 value 4 name
  $1F0 v:0 

>Cheat name 2
 'V' {min , max}
  $1F1 d:00000002 
  $1f2  v:000003 

>Cheat name 3
 'D' {0}
  $1f3 d:0005 
----------------------------------------------------------------------
-------------------------Example---------------------------------
#Super P
# Nintendo entertainment system
# Rom
#Author by Cheater

< SVI UVI 

>Default weapon
'L' {1, 2, 3, 4} 
 # Weapon M
 # Weapon L
 # Weapon G
 # Weapon S
  $1F0 v:0 

>Players 1/2 lives
 'V' {1,  000063}
  $1F1 d:00000002 
  $1f2  v:000003 

>Enemies shots don't kill you
 'D' {0}
  $1f3 d:0005 
----------------------------------------------------------------------